Skip to content

Conversation

andyp1per
Copy link
Contributor

@andyp1per andyp1per commented Aug 29, 2025

This provides a new function get_breach_direction_NED() which gives the direction of the closest fence matching the provided bitmask, akin to what get_breach_distance() does.

@andyp1per andyp1per force-pushed the pr-fence-direction branch 4 times, most recently from 4ee5ef8 to a228884 Compare August 30, 2025 16:07
@andyp1per andyp1per marked this pull request as ready for review August 30, 2025 16:08
@rmackay9
Copy link
Contributor

rmackay9 commented Sep 24, 2025

this feature looks like a good step towards resolving the long-term issue of RTL not working if the vehicle starts outside the fence. The only concern is around the Polygon_closest_distance_point() method and whether it requires more CPU especially on fences with lots of points

@timtuxworth
Copy link
Contributor

It's not a breach is it?

This seems to be calculating the distance to the nearest fence from the current location. There is no breach. I think it needs a different name maybe get_nearest_direction_NED()?

@timtuxworth
Copy link
Contributor

this feature looks like a good step towards resolving the long-term issue of RTL not working if the vehicle starts outside the fence. The only concern is around the Polygon_closest_distance_point() method and whether it requires more CPU especially on fences with lots of points

Yes this method is probably O(n^2), it's polynomial for sure, which means it won't scale. This is why the OA library does these calculations in a kind of background thread. The code is also fundamentally the same as the code in the OA library. Should this not be a call into the existing OA library code?

@andyp1per andyp1per force-pushed the pr-fence-direction branch 2 times, most recently from fd1c1f0 to 07f9e78 Compare October 7, 2025 19:11
@tridge
Copy link
Contributor

tridge commented Oct 8, 2025

needs to pass CI :-)

@andyp1per andyp1per requested a review from tridge October 15, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants